{"ast":null,"code":"import _defineProperty from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nvar __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) {\n    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  }\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { PresetColorTypes, PresetStatusColorTypes } from '../_util/colors';\nimport Wave from '../_util/wave';\nimport warning from '../_util/warning';\nimport CheckableTag from './CheckableTag';\nimport useStyle from './style';\nvar PresetColorRegex = new RegExp(\"^(\".concat(PresetColorTypes.join('|'), \")(-inverse)?$\"));\nvar PresetStatusColorRegex = new RegExp(\"^(\".concat(PresetStatusColorTypes.join('|'), \")$\"));\nvar InternalTag = function InternalTag(_a, ref) {\n  var _classNames;\n  var customizePrefixCls = _a.prefixCls,\n    className = _a.className,\n    style = _a.style,\n    children = _a.children,\n    icon = _a.icon,\n    color = _a.color,\n    onClose = _a.onClose,\n    closeIcon = _a.closeIcon,\n    _a$closable = _a.closable,\n    closable = _a$closable === void 0 ? false : _a$closable,\n    props = __rest(_a, [\"prefixCls\", \"className\", \"style\", \"children\", \"icon\", \"color\", \"onClose\", \"closeIcon\", \"closable\"]);\n  var _React$useContext = React.useContext(ConfigContext),\n    getPrefixCls = _React$useContext.getPrefixCls,\n    direction = _React$useContext.direction;\n  var _React$useState = React.useState(true),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    visible = _React$useState2[0],\n    setVisible = _React$useState2[1];\n  // Warning for deprecated usage\n  if (process.env.NODE_ENV !== 'production') {\n    process.env.NODE_ENV !== \"production\" ? warning(!('visible' in props), 'Tag', '`visible` is deprecated, please use `visible && <Tag />` instead.') : void 0;\n  }\n  React.useEffect(function () {\n    if ('visible' in props) {\n      setVisible(props.visible);\n    }\n  }, [props.visible]);\n  var isPresetColor = function isPresetColor() {\n    if (!color) {\n      return false;\n    }\n    return PresetColorRegex.test(color) || PresetStatusColorRegex.test(color);\n  };\n  var tagStyle = Object.assign({\n    backgroundColor: color && !isPresetColor() ? color : undefined\n  }, style);\n  var presetColor = isPresetColor();\n  var prefixCls = getPrefixCls('tag', customizePrefixCls);\n  // Style\n  var _useStyle = useStyle(prefixCls),\n    _useStyle2 = _slicedToArray(_useStyle, 2),\n    wrapSSR = _useStyle2[0],\n    hashId = _useStyle2[1];\n  var tagClassName = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(color), presetColor), _defineProperty(_classNames, \"\".concat(prefixCls, \"-has-color\"), color && !presetColor), _defineProperty(_classNames, \"\".concat(prefixCls, \"-hidden\"), !visible), _defineProperty(_classNames, \"\".concat(prefixCls, \"-rtl\"), direction === 'rtl'), _classNames), className, hashId);\n  var handleCloseClick = function handleCloseClick(e) {\n    e.stopPropagation();\n    onClose === null || onClose === void 0 ? void 0 : onClose(e);\n    if (e.defaultPrevented) {\n      return;\n    }\n    setVisible(false);\n  };\n  var renderCloseIcon = function renderCloseIcon() {\n    if (closable) {\n      return closeIcon ? /*#__PURE__*/React.createElement(\"span\", {\n        className: \"\".concat(prefixCls, \"-close-icon\"),\n        onClick: handleCloseClick\n      }, closeIcon) : /*#__PURE__*/React.createElement(CloseOutlined, {\n        className: \"\".concat(prefixCls, \"-close-icon\"),\n        onClick: handleCloseClick\n      });\n    }\n    return null;\n  };\n  var isNeedWave = 'onClick' in props || children && children.type === 'a';\n  var iconNode = icon || null;\n  var kids = iconNode ? /*#__PURE__*/React.createElement(React.Fragment, null, iconNode, /*#__PURE__*/React.createElement(\"span\", null, children)) : children;\n  var tagNode = /*#__PURE__*/React.createElement(\"span\", Object.assign({}, props, {\n    ref: ref,\n    className: tagClassName,\n    style: tagStyle\n  }), kids, renderCloseIcon());\n  return wrapSSR(isNeedWave ? /*#__PURE__*/React.createElement(Wave, null, tagNode) : tagNode);\n};\nvar Tag = /*#__PURE__*/React.forwardRef(InternalTag);\nif (process.env.NODE_ENV !== 'production') {\n  Tag.displayName = 'Tag';\n}\nTag.CheckableTag = CheckableTag;\nexport default Tag;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","CloseOutlined","classNames","React","ConfigContext","PresetColorTypes","PresetStatusColorTypes","Wave","warning","CheckableTag","useStyle","PresetColorRegex","RegExp","join","PresetStatusColorRegex","InternalTag","_a","ref","customizePrefixCls","prefixCls","className","style","children","icon","color","onClose","closeIcon","closable","props","useContext","getPrefixCls","direction","useState","visible","setVisible","process","env","NODE_ENV","useEffect","isPresetColor","test","tagStyle","assign","backgroundColor","undefined","presetColor","wrapSSR","hashId","tagClassName","handleCloseClick","stopPropagation","defaultPrevented","renderCloseIcon","createElement","onClick","isNeedWave","type","iconNode","kids","Fragment","tagNode","Tag","forwardRef","displayName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/tag/index.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { PresetColorTypes, PresetStatusColorTypes } from '../_util/colors';\nimport Wave from '../_util/wave';\nimport warning from '../_util/warning';\nimport CheckableTag from './CheckableTag';\nimport useStyle from './style';\nconst PresetColorRegex = new RegExp(`^(${PresetColorTypes.join('|')})(-inverse)?$`);\nconst PresetStatusColorRegex = new RegExp(`^(${PresetStatusColorTypes.join('|')})$`);\nconst InternalTag = (_a, ref) => {\n  var {\n      prefixCls: customizePrefixCls,\n      className,\n      style,\n      children,\n      icon,\n      color,\n      onClose,\n      closeIcon,\n      closable = false\n    } = _a,\n    props = __rest(_a, [\"prefixCls\", \"className\", \"style\", \"children\", \"icon\", \"color\", \"onClose\", \"closeIcon\", \"closable\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const [visible, setVisible] = React.useState(true);\n  // Warning for deprecated usage\n  if (process.env.NODE_ENV !== 'production') {\n    process.env.NODE_ENV !== \"production\" ? warning(!('visible' in props), 'Tag', '`visible` is deprecated, please use `visible && <Tag />` instead.') : void 0;\n  }\n  React.useEffect(() => {\n    if ('visible' in props) {\n      setVisible(props.visible);\n    }\n  }, [props.visible]);\n  const isPresetColor = () => {\n    if (!color) {\n      return false;\n    }\n    return PresetColorRegex.test(color) || PresetStatusColorRegex.test(color);\n  };\n  const tagStyle = Object.assign({\n    backgroundColor: color && !isPresetColor() ? color : undefined\n  }, style);\n  const presetColor = isPresetColor();\n  const prefixCls = getPrefixCls('tag', customizePrefixCls);\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const tagClassName = classNames(prefixCls, {\n    [`${prefixCls}-${color}`]: presetColor,\n    [`${prefixCls}-has-color`]: color && !presetColor,\n    [`${prefixCls}-hidden`]: !visible,\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className, hashId);\n  const handleCloseClick = e => {\n    e.stopPropagation();\n    onClose === null || onClose === void 0 ? void 0 : onClose(e);\n    if (e.defaultPrevented) {\n      return;\n    }\n    setVisible(false);\n  };\n  const renderCloseIcon = () => {\n    if (closable) {\n      return closeIcon ? /*#__PURE__*/React.createElement(\"span\", {\n        className: `${prefixCls}-close-icon`,\n        onClick: handleCloseClick\n      }, closeIcon) : /*#__PURE__*/React.createElement(CloseOutlined, {\n        className: `${prefixCls}-close-icon`,\n        onClick: handleCloseClick\n      });\n    }\n    return null;\n  };\n  const isNeedWave = 'onClick' in props || children && children.type === 'a';\n  const iconNode = icon || null;\n  const kids = iconNode ? /*#__PURE__*/React.createElement(React.Fragment, null, iconNode, /*#__PURE__*/React.createElement(\"span\", null, children)) : children;\n  const tagNode = /*#__PURE__*/React.createElement(\"span\", Object.assign({}, props, {\n    ref: ref,\n    className: tagClassName,\n    style: tagStyle\n  }), kids, renderCloseIcon());\n  return wrapSSR(isNeedWave ? /*#__PURE__*/React.createElement(Wave, null, tagNode) : tagNode);\n};\nconst Tag = /*#__PURE__*/React.forwardRef(InternalTag);\nif (process.env.NODE_ENV !== 'production') {\n  Tag.displayName = 'Tag';\n}\nTag.CheckableTag = CheckableTag;\nexport default Tag;"],"mappings":";;AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC;IAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAAC;EACjG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,E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